import $ from 'jquery'
import { Qi } from './utils/util'
import axios from "axios"
import { switchMenu } from "./utils/switchmenu"
import { returnColumn } from './utils/returncolumn'
import {request} from "./ajax/ajax"
require("./css/index.css");
switchMenu();
Qi("formal3").addEventListener("click", function () {
    let a = $("#formal").val();
    let b = $("#formal2").val();
    let c = $("#formal7").val();
    let json = { "method": "zip", "filePath": a, "targetPath": b, "format": c };
    if (a == "" || b == "" || c == "") {
        alert("请填写完整所有输入框")
    } else {
      request("GET",'http://172.16.14.67:8080/Zip01/Zip',json,returnColumn)
   
}
})
Qi("demo2").addEventListener("click", function () {
    let a = $("#demo").val();
    let b = $("#demo1").val();
    let json = { "method": "unzip", "filePath": a, "targetPath": b};
    if (a == "" || b == "") {
        alert("请填写完整所有输入框")
    } else {
        request("GET",'http://172.16.14.67:8080/Zip01/Zip',json,returnColumn)
    }
})
